1 from oxsConfig
import ttk
, W
, E
, fFlow
, flowPulsesmlVar
, flowTankCapVar
, flowPPMResetVar
2 from oxsConfig
import flowL1ValueVar
, flowL1CorrVar
, flowL2ValueVar
, flowL2CorrVar
, flowL3ValueVar
, flowL3CorrVar
, flowL4ValueVar
, flowL4CorrVar
5 #define PULSES_PER_ML 10.0 // number of pulses per milli liter (depends on sensor); can have decimals
6 #define TANK_CAPACITY 1000 // tank capacity in ml
7 #define INIT_FLOW_PARAM 30 , 100 , 500 , 700 , 0 , 0, 0, 0 // define at 4 levels of flow (in mliter/min) (e.g. 30, 100, 500, 700) 4 correction parameters (in %; e.g. 20, 10, -5, 15); flow levels have to be sorted from low to high
8 #define FLOW_SENSOR_RESET_AT_PPM 95 // when absolute value of ppm is greater than this, flow counter is reset.
10 ttk
.Label(fFlow
, text
="Pulses per ml" ).grid(column
= 0, row
=1, padx
= (15,5), pady
=25 , sticky
=(E
))
11 ttk
.Label(fFlow
, text
="Tank capacity (ml)" ).grid(column
= 0, row
=2, padx
= (15,5), pady
=5 , sticky
=(E
))
12 ttk
.Label(fFlow
, text
="Level 1" ).grid(column
= 0, row
=3, padx
= (15,5), pady
=5 , sticky
=(E
))
13 ttk
.Label(fFlow
, text
="Correction 1" ).grid(column
= 2, row
=3, padx
= (15,5), pady
=5 , sticky
=(E
))
14 ttk
.Label(fFlow
, text
="Level 2" ).grid(column
= 0, row
=4, padx
= (15,5), pady
=5 , sticky
=(E
))
15 ttk
.Label(fFlow
, text
="Correction 2" ).grid(column
= 2, row
=4, padx
= (15,5), pady
=5 , sticky
=(E
))
16 ttk
.Label(fFlow
, text
="Level 3" ).grid(column
= 0, row
=5, padx
= (15,5), pady
=5 , sticky
=(E
))
17 ttk
.Label(fFlow
, text
="Correction 3" ).grid(column
= 2, row
=5, padx
= (15,5), pady
=5 , sticky
=(E
))
18 ttk
.Label(fFlow
, text
="Level 4" ).grid(column
= 0, row
=6, padx
= (15,5), pady
=5 , sticky
=(E
))
19 ttk
.Label(fFlow
, text
="Correction 4" ).grid(column
= 2, row
=6, padx
= (15,5), pady
=5 , sticky
=(E
))
20 ttk
.Label(fFlow
, text
="PPM Reset level" ).grid(column
= 0, row
=7, padx
= (15,5), pady
=5 , sticky
=(E
))
22 ttk
.Entry(fFlow
, textvariable
=flowPulsesmlVar
, width
='5', justify
='right').grid(column
=1 , row
=1)
23 ttk
.Entry(fFlow
, textvariable
=flowTankCapVar
, width
='5', justify
='right').grid(column
=1 , row
=2)
24 ttk
.Entry(fFlow
, textvariable
=flowL1ValueVar
, width
='5', justify
='right').grid(column
=1 , row
=3)
25 ttk
.Entry(fFlow
, textvariable
=flowL1CorrVar
, width
='5', justify
='right').grid(column
=3 , row
=3)
26 ttk
.Entry(fFlow
, textvariable
=flowL2ValueVar
, width
='5', justify
='right').grid(column
=1 , row
=4)
27 ttk
.Entry(fFlow
, textvariable
=flowL2CorrVar
, width
='5', justify
='right').grid(column
=3 , row
=4)
28 ttk
.Entry(fFlow
, textvariable
=flowL3ValueVar
, width
='5', justify
='right').grid(column
=1 , row
=5)
29 ttk
.Entry(fFlow
, textvariable
=flowL3CorrVar
, width
='5', justify
='right').grid(column
=3 , row
=5)
30 ttk
.Entry(fFlow
, textvariable
=flowL4ValueVar
, width
='5', justify
='right').grid(column
=1 , row
=6)
31 ttk
.Entry(fFlow
, textvariable
=flowL4CorrVar
, width
='5', justify
='right').grid(column
=3 , row
=6)
32 ttk
.Entry(fFlow
, textvariable
=flowPPMResetVar
, width
='5', justify
='right').grid(column
=1 , row
=7)